Skip to content

fix(client): read the Inbox workflow pack through the plugin endpoint (#2656) - #2657

Merged
Birfy merged 1 commit into
mainfrom
fix/2656-inbox-workflow-prefix
Nov 8, 2026
Merged

Birfy merged 1 commit into
mainfrom
fix/2656-inbox-workflow-prefix

Conversation

@Birfy

@Birfy Birfy commented Nov 8, 2026 •

Copy link
Copy Markdown
Collaborator

Written-by: Triage
Fixes #2656
Owner: Triage
Reviewer: Reviewer

What changed

core/src/client/index.js passed the bare call into readWorkflows, so every Inbox poll posted workflow/state without the flybot/ prefix. core/src/host/channel.js routes only flybot/ endpoints to a plugin and answers bot/not-found otherwise; readWorkflows reads that refusal as "The Workflow plugin is not installed…", so the read settled phase: 'error', workflowsOf returned [], and a failed workflow run never appeared in the Inbox or its badge. The action now uses flybotCall (the flybot/-prefixed call from flybot-slots.js) — the same call the Workflows page already receives from settings.js.

actions.workflows and actions.workflowSave still go through the bare call; a search of core/src/client finds no client call site for either, so they are left unchanged.

Tests

core/test/inbox-workflow-prefix.test.js reads the wiring expression index.js actually ships, drives it against a fetch that implements channel.js's two branches, and asserts the host saw only flybot/workflow/state, that the read settles ready, and that pack.workflows is non-empty. On pristine b4de72ca9f it fails with:

the host saw ["workflow/state"]; a plugin read must carry the flybot/ prefix

It does not stub workflowState (unlike inbox-workflow-failure.test.js:321), so the assembly is what is measured.

Verification at the tip

Tip SHA: f840979
Ran:

  • cd core && TZ=UTC DSH_HARNESS=/data/dsh/bot/workspace/d2607/repo/core/dev/harness node --import ./test/harness-resolve.mjs --test test/inbox-workflow-prefix.test.js test/inbox-workflow-failure.test.js — 11/11 pass
  • the new file alone on pristine b4de72ca9f — 1 failing (the assertion quoted above)
  • cd core && npm run build — core/client.js regenerated (readWorkflows(call2), where call2 is the flybot/ call)
  • node scripts/ds-bot-patches.mjs generate — check and canonical green (patches 0003/0008 updated, the new test stored whole under files/test/)
  • node scripts/build-client.mjs --check — exit 0
  • node .github/scripts/check-mojibake.mjs --check — 0 occurrences of U+FFFD in 1556 text files
  • node .github/scripts/changelog.mjs check — 15 fragments well formed
  • oxlint (src, test) — 0 errors
    Not run: full npm run verify (one suite at a time on this box, per the task), npm run lint's arch-docs half (it needs the branch base as a git checkout); the Docs-not-needed: trailer is in both this body and the branch commit.

Checkpoint

{
  "pr": 2657,
  "claim": "Triage",
  "issue": 2656,
  "summary": "The Inbox workflow read used the bare call, so the host refused workflow/state with bot/not-found and readWorkflows settled every poll as \"plugin not installed\": a failed run never reached the Needs list or its badge. index.js now passes the flybot/-prefixed call into readWorkflows, the same call the Workflows page uses. The new test drives the wiring index.js ships against a fetch that implements channel.js two branches, so it fails on the old wiring. actions.workflows and actions.workflowSave still use the bare call with no client call site, so they are untouched.",
  "files": ["core/src/client/index.js", "core/client.js", "core/test/inbox-workflow-prefix.test.js", "patches/ds-bot/0003-flybot-api-client.patch", "patches/ds-bot/0008-client-bundle.patch", "patches/ds-bot/files/test/inbox-workflow-prefix.test.js", "changelog.d/2656.fixed.md"],
  "checks": { "ran": "TZ=UTC DSH_HARNESS=… node --import ./test/harness-resolve.mjs --test test/inbox-workflow-prefix.test.js test/inbox-workflow-failure.test.js; node scripts/ds-bot-patches.mjs check; node scripts/ds-bot-patches.mjs canonical; node scripts/build-client.mjs --check; node .github/scripts/check-mojibake.mjs --check", "result": "green", "at": "f84097914334ccac78bd20c75b1ea34816361dce" },
  "next": "none — ready for review"
}

Docs-not-needed: one-line endpoint-prefix fix; docs/subsystems/core-client.md already describes the Inbox read and its non-ready behavior (#2656).

The shell's Inbox wiring passed the bare `call` into readWorkflows, so the host
answered `bot/not-found`, the read settled as "The Workflow plugin is not
installed…", and a failed workflow run never reached the Needs list or its badge.
It now uses the same `flybot/`-prefixed call the Workflows page does (#2656).

Fixes #2656
Docs-not-needed: one-line endpoint-prefix fix; docs/subsystems/core-client.md already describes the Inbox read and its non-ready behavior (#2656)
@Birfy Birfy added the agent-pr Pull request opened by an agent label Nov 8, 2026
@Birfy Birfy self-assigned this Nov 8, 2026
@Birfy
Birfy added this pull request to the merge queue Nov 8, 2026
Merged via the queue into main with commit e226753 Nov 8, 2026
17 of 19 checks passed
@Birfy
Birfy deleted the fix/2656-inbox-workflow-prefix branch November 8, 2026 02:11
@github-actions github-actions Bot removed the agent-pr Pull request opened by an agent label Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inbox: a failed workflow run never appears — the shell action reads workflow/state without the flybot/ prefix

1 participant